/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code DoubleLikeDetail}
 */
public final class DoubleLikeDetail extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:DoubleLikeDetail)
    DoubleLikeDetailOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DoubleLikeDetail.newBuilder() to construct.
  private DoubleLikeDetail(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private DoubleLikeDetail() {
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new DoubleLikeDetail();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_DoubleLikeDetail_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_DoubleLikeDetail_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            DoubleLikeDetail.class, Builder.class);
  }

  public static final int DOUBLEFLAG_FIELD_NUMBER = 1;
  private boolean doubleFlag_ = false;
  /**
   * <code>bool doubleFlag = 1;</code>
   * @return The doubleFlag.
   */
  @Override
  public boolean getDoubleFlag() {
    return doubleFlag_;
  }

  public static final int SEQID_FIELD_NUMBER = 2;
  private int seqId_ = 0;
  /**
   * <code>uint32 seqId = 2;</code>
   * @return The seqId.
   */
  @Override
  public int getSeqId() {
    return seqId_;
  }

  public static final int RENEWALSNUM_FIELD_NUMBER = 3;
  private int renewalsNum_ = 0;
  /**
   * <code>uint32 renewalsNum = 3;</code>
   * @return The renewalsNum.
   */
  @Override
  public int getRenewalsNum() {
    return renewalsNum_;
  }

  public static final int TRIGGERSNUM_FIELD_NUMBER = 4;
  private int triggersNum_ = 0;
  /**
   * <code>uint32 triggersNum = 4;</code>
   * @return The triggersNum.
   */
  @Override
  public int getTriggersNum() {
    return triggersNum_;
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (doubleFlag_ != false) {
      output.writeBool(1, doubleFlag_);
    }
    if (seqId_ != 0) {
      output.writeUInt32(2, seqId_);
    }
    if (renewalsNum_ != 0) {
      output.writeUInt32(3, renewalsNum_);
    }
    if (triggersNum_ != 0) {
      output.writeUInt32(4, triggersNum_);
    }
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (doubleFlag_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(1, doubleFlag_);
    }
    if (seqId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(2, seqId_);
    }
    if (renewalsNum_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(3, renewalsNum_);
    }
    if (triggersNum_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeUInt32Size(4, triggersNum_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof DoubleLikeDetail)) {
      return super.equals(obj);
    }
    DoubleLikeDetail other = (DoubleLikeDetail) obj;

    if (getDoubleFlag()
        != other.getDoubleFlag()) return false;
    if (getSeqId()
        != other.getSeqId()) return false;
    if (getRenewalsNum()
        != other.getRenewalsNum()) return false;
    if (getTriggersNum()
        != other.getTriggersNum()) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + DOUBLEFLAG_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getDoubleFlag());
    hash = (37 * hash) + SEQID_FIELD_NUMBER;
    hash = (53 * hash) + getSeqId();
    hash = (37 * hash) + RENEWALSNUM_FIELD_NUMBER;
    hash = (53 * hash) + getRenewalsNum();
    hash = (37 * hash) + TRIGGERSNUM_FIELD_NUMBER;
    hash = (53 * hash) + getTriggersNum();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static DoubleLikeDetail parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static DoubleLikeDetail parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static DoubleLikeDetail parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static DoubleLikeDetail parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static DoubleLikeDetail parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static DoubleLikeDetail parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static DoubleLikeDetail parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static DoubleLikeDetail parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static DoubleLikeDetail parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static DoubleLikeDetail parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static DoubleLikeDetail parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static DoubleLikeDetail parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(DoubleLikeDetail prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code DoubleLikeDetail}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:DoubleLikeDetail)
      DoubleLikeDetailOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_DoubleLikeDetail_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_DoubleLikeDetail_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              DoubleLikeDetail.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.DoubleLikeDetail.newBuilder()
    private Builder() {

    }

    private Builder(
        BuilderParent parent) {
      super(parent);

    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      doubleFlag_ = false;
      seqId_ = 0;
      renewalsNum_ = 0;
      triggersNum_ = 0;
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_DoubleLikeDetail_descriptor;
    }

    @Override
    public DoubleLikeDetail getDefaultInstanceForType() {
      return DoubleLikeDetail.getDefaultInstance();
    }

    @Override
    public DoubleLikeDetail build() {
      DoubleLikeDetail result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public DoubleLikeDetail buildPartial() {
      DoubleLikeDetail result = new DoubleLikeDetail(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(DoubleLikeDetail result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.doubleFlag_ = doubleFlag_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.seqId_ = seqId_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.renewalsNum_ = renewalsNum_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.triggersNum_ = triggersNum_;
      }
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof DoubleLikeDetail) {
        return mergeFrom((DoubleLikeDetail)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(DoubleLikeDetail other) {
      if (other == DoubleLikeDetail.getDefaultInstance()) return this;
      if (other.getDoubleFlag() != false) {
        setDoubleFlag(other.getDoubleFlag());
      }
      if (other.getSeqId() != 0) {
        setSeqId(other.getSeqId());
      }
      if (other.getRenewalsNum() != 0) {
        setRenewalsNum(other.getRenewalsNum());
      }
      if (other.getTriggersNum() != 0) {
        setTriggersNum(other.getTriggersNum());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              doubleFlag_ = input.readBool();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 16: {
              seqId_ = input.readUInt32();
              bitField0_ |= 0x00000002;
              break;
            } // case 16
            case 24: {
              renewalsNum_ = input.readUInt32();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 32: {
              triggersNum_ = input.readUInt32();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private boolean doubleFlag_ ;
    /**
     * <code>bool doubleFlag = 1;</code>
     * @return The doubleFlag.
     */
    @Override
    public boolean getDoubleFlag() {
      return doubleFlag_;
    }
    /**
     * <code>bool doubleFlag = 1;</code>
     * @param value The doubleFlag to set.
     * @return This builder for chaining.
     */
    public Builder setDoubleFlag(boolean value) {

      doubleFlag_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>bool doubleFlag = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearDoubleFlag() {
      bitField0_ = (bitField0_ & ~0x00000001);
      doubleFlag_ = false;
      onChanged();
      return this;
    }

    private int seqId_ ;
    /**
     * <code>uint32 seqId = 2;</code>
     * @return The seqId.
     */
    @Override
    public int getSeqId() {
      return seqId_;
    }
    /**
     * <code>uint32 seqId = 2;</code>
     * @param value The seqId to set.
     * @return This builder for chaining.
     */
    public Builder setSeqId(int value) {

      seqId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 seqId = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearSeqId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      seqId_ = 0;
      onChanged();
      return this;
    }

    private int renewalsNum_ ;
    /**
     * <code>uint32 renewalsNum = 3;</code>
     * @return The renewalsNum.
     */
    @Override
    public int getRenewalsNum() {
      return renewalsNum_;
    }
    /**
     * <code>uint32 renewalsNum = 3;</code>
     * @param value The renewalsNum to set.
     * @return This builder for chaining.
     */
    public Builder setRenewalsNum(int value) {

      renewalsNum_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 renewalsNum = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearRenewalsNum() {
      bitField0_ = (bitField0_ & ~0x00000004);
      renewalsNum_ = 0;
      onChanged();
      return this;
    }

    private int triggersNum_ ;
    /**
     * <code>uint32 triggersNum = 4;</code>
     * @return The triggersNum.
     */
    @Override
    public int getTriggersNum() {
      return triggersNum_;
    }
    /**
     * <code>uint32 triggersNum = 4;</code>
     * @param value The triggersNum to set.
     * @return This builder for chaining.
     */
    public Builder setTriggersNum(int value) {

      triggersNum_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>uint32 triggersNum = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearTriggersNum() {
      bitField0_ = (bitField0_ & ~0x00000008);
      triggersNum_ = 0;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:DoubleLikeDetail)
  }

  // @@protoc_insertion_point(class_scope:DoubleLikeDetail)
  private static final DoubleLikeDetail DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new DoubleLikeDetail();
  }

  public static DoubleLikeDetail getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<DoubleLikeDetail>
      PARSER = new com.google.protobuf.AbstractParser<DoubleLikeDetail>() {
    @Override
    public DoubleLikeDetail parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<DoubleLikeDetail> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<DoubleLikeDetail> getParserForType() {
    return PARSER;
  }

  @Override
  public DoubleLikeDetail getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

